package com.fan.springboot.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fan.springboot.dao.BannerDao;
import com.fan.springboot.domain.Banner;

@Service
public class BannerService {
	
	@Autowired
	private BannerDao bannerDao;

	public void save(Banner banner) {
		bannerDao.save(banner);
	}

	public void delete(String id) {
		bannerDao.delete(id);
	}

	public List<Banner> findBannerListByOrderBy(String orderby) {
		return bannerDao.findBannerListByOrderBy(orderby);
	}
	
	public int getPrevSequence(){
		return bannerDao.getPrevSequence();
	}
	
	public void updateBanner(Banner banner){
		bannerDao.updateBanner(banner);
	}
	
	public Banner findBannerById(String id){
		return bannerDao.findBannerById(id);
	}

}
